﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NLBS.Views
{
    public partial class CommentListPresenter
    {
        #region event
        /// <summary>
        /// 当评论添加前触发的事件
        /// </summary>
        public static event EventHandler<CommentInsertEventArgs> Inserting;
        /// <summary>
        /// 当评论添加后触发的事件
        /// </summary>
        public static event EventHandler<CommentInsertEventArgs> Inserted;
        /// <summary>
        /// 当评论删除前触发的事件
        /// </summary>
        public static event EventHandler<CommentDeleteEventArgs> Deleteing;
        /// <summary>
        /// 当评论删除后触发的事件
        /// </summary>
        public static event EventHandler<CommentDeleteEventArgs> Deleted;
        /// <summary>
        /// 当评论更新前触发的事件
        /// </summary>
        public static event EventHandler<CommentUpdateEventArgs> Updateing;
        /// <summary>
        /// 当评论更新后触发的事件
        /// </summary>
        public static event EventHandler<CommentUpdateEventArgs> Updated;
        /// <summary>
        /// 当评论选中前触发的事件
        /// </summary>
        public static event EventHandler<CommentSelectEventArgs> Selecting;
        /// <summary>
        /// 当评论选中后触发的事件
        /// </summary>
        public static event EventHandler<CommentSelectEventArgs> Selected;

        /// <summary>
        /// 引发Selecting事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnSelecting(CommentSelectEventArgs e)
        {
            if (Selecting != null)
            {
                Selecting(this, e);
            }
        }
        /// <summary>
        /// 引发Selected事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnSelected(CommentSelectEventArgs e)
        {
            if (Selected != null)
            {
                Selected(this, e);
            }
        }
        /// <summary>
        /// 引发Deleteing事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnDeleteing(CommentDeleteEventArgs e)
        {
            if (Deleteing != null)
            {
                Deleteing(this, e);
            }
        }
        /// <summary>
        /// 引发Deleted事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnDeleted(CommentDeleteEventArgs e)
        {
            if (Deleted != null)
            {
                Deleted(this, e);
            }
        }
        /// <summary>
        /// 引发Updateing事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnUpdateing(CommentUpdateEventArgs e)
        {
            if (Updateing != null)
            {
                Updateing(this, e);
            }
        }
        /// <summary>
        /// 引发Updated事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnUpdated(CommentUpdateEventArgs e)
        {
            if (Updated != null)
            {
                Updated(this, e);
            }
        }
        /// <summary>
        /// 引发Inserting事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnInserting(CommentInsertEventArgs e)
        {
            if (Inserting != null)
            {
                Inserting(this, e);
            }
        }
        /// <summary>
        /// 引发Inserted事件
        /// </summary>
        /// <param name="e">它包含事件数据</param>
        protected virtual void OnInserted(CommentInsertEventArgs e)
        {
            if (Inserting != null)
            {
                Inserted(this, e);
            }
        }

        #endregion
    }
}
